package com.bbcare.sso.client;

import java.io.Serializable;
import org.json.JSONObject;

/**
 * 租户
 * 
 * 每个新开租户（无论级别）都建立一个租户记录，租户中需设置客户管理员账号
 * 
 * @author lechen
 */
public class Tenant implements Serializable {

    private static final long serialVersionUID = 1L;

    private String id;

    // 租户名称
    private String name;

    // 租户图标
    private String icon;

    // 租户类型：1、科室，2、医院，3、多中心，4、医联体
    private int type;

    // 根组织ID
    private String rootGroupId;

    public Tenant(JSONObject data) {
        this.id = data.getString("tenantId");
        this.name = data.getString("tenantName");
        this.icon = data.getString("tenantIcon");
        this.type = data.getInt("tenantType");
        this.rootGroupId = data.getString("tenantRootGroupId");
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getRootGroupId() {
        return rootGroupId;
    }

    public void setRootGroupId(String rootGroupId) {
        this.rootGroupId = rootGroupId;
    }

}
